import apibase from "@/apis/apiBase";
import axios from "axios";
//获取授权地址
export const $getredirectUrl = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/wechat/api/wechat/authcode',
    data: params,
    instance,
  });
}

//获取openID
export const $getUserInfo = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/wechat/api/wechat/authCodeToOpenid',
    data: params,
    instance,
  });
}
//登录
export const $loginAuth = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/front/login/auth',
    data: params,
    instance,
  });
}
//获取验证码
export const $getCaptcha = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/front/captcha/captcha',
    data: params,
    instance,
  });
}

//获取动态码
export const $getMobileCode = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/front/tripartite/mobileCode',
    data: params,
    instance,
  });
}

//第三方绑定手机号并登录
export const $tripartiteMobile = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/front/tripartite/mobile',
    data: params,
    instance,
  });
}
//获取业务员信息
export const $getSalerInfo = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/female/saler/info',
    data: params,
    instance,
  });
}

//业务员加入渠道
export const $addSaler = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/female/saler/addSaler',
    data: params,
    instance,
  });
}

// 获取jssdk配置
export const $wechatJssdkConfig = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/wechat/api/wechat/jssdkConfig',
    data: params,
    instance,
  });
}
// 个人下单
export const $orderSingleCreate = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/female/order_single/create',
    data: params,
    instance,
  });
}
//获取字典数据
export const $commonCategory = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/female/common/category',
    data: params,
    instance,
  });
}
// 订单列表
export const $orderSingleList = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/female/orderSingle/list',
    data: params,
    instance,
  });
}

// 订单详情
export const $orderSingleDetail = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.get({
    url: '/female/orderSingle/detail',
    data: params,
    instance,
  });
}

// 提交录屏信息
export const $orderSingleRecordScreen = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/female/orderSingle/recordScreen',
    data: {},
    instance,
    formData: params,
  });
}
// 发送短信
export const $commonSms = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/female/common/sendSms',
    data: params,
    instance,
  });
}

// 获取jssdk配置
export const $pay = (params: any) => {
  const $server = new apibase();
  const instance = axios.create();
  return $server.post({
    url: '/front/pay/pay',
    data: params,
    instance,
  });
}